package com.gxa.core.recycling.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import javax.persistence.*;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author ：looker
 * @date ：Created in 2021/11/29 11:20
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "goods")
@Document(collection = "goodsList")
public class Goods implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    @Field("id")
    private Long id;
    @Column(name = "name")
    @Field("name")
    private String name;
    //兑换所需积分
    @Column(name = "needPoints")
    @Field("needPoints")
    private Integer needPoints;

    //库存
    @Field("counts")
    private Integer counts;

    //上下架
    @Field("state")
    private Boolean state;

    //商品类型  虚拟啊之类的
    @Field("type")
    private String type;

    //是否热兑
    @Field("hot")
    private Boolean hot;

    //排序
    @Field("rank")
    private Integer rank;

    //商品详细描述
    @Field("remark")
    private String remark;

    private  List<String> url = new ArrayList<>();
    //private List<Imgs> list=new ArrayList();



}
